/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package B3D_Elements.B3D_Filters.B3D_Shadows;

import static com.jme3.shadow.EdgeFilteringMode.Bilinear;
import static com.jme3.shadow.EdgeFilteringMode.Dither;
import static com.jme3.shadow.EdgeFilteringMode.Nearest;
import static com.jme3.shadow.EdgeFilteringMode.PCF4;
import static com.jme3.shadow.EdgeFilteringMode.PCF8;
import static com.jme3.shadow.EdgeFilteringMode.PCFPOISSON;
import java.io.Serializable;
import java.util.UUID;

/**
 *
 * @author David
 */
public class B3D_DLShadow extends B3D_Shadow implements Serializable
{

    private UUID directionalLightID;

    public B3D_DLShadow(
            String _name, 
            float _intensity, 
            UUID _directionalLightID, 
            boolean _flushQueues,
            com.jme3.shadow.EdgeFilteringMode _edgeFilteringMode,
            int _edgeThickness,
            int _shadowMapSize)
    {
        setName(_name);
        setIntensity(_intensity);        setFlushQueues(_flushQueues);
        switch (_edgeFilteringMode)
        {
            case Bilinear:
                setEdgeFilteringMode(EdgeFilteringMode.Bilinear);
                break;
            case Dither:
                setEdgeFilteringMode(EdgeFilteringMode.Dither);
                break;
            case Nearest:
                setEdgeFilteringMode(EdgeFilteringMode.Nearest);
                break;
            case PCF4:
                setEdgeFilteringMode(EdgeFilteringMode.PCF4);
                break;
            case PCF8:
                setEdgeFilteringMode(EdgeFilteringMode.PCF8);
                break;
            case PCFPOISSON:
                setEdgeFilteringMode(EdgeFilteringMode.PCFPOISSON);
        }
        setEdgeThickness(_edgeThickness);
        setShadowMapSize(_shadowMapSize);
        directionalLightID = _directionalLightID;
    }

    public UUID getDirectionalLightID()
    {
        return directionalLightID;
    }

    public void setDirectionalLightID(UUID _directionalLightID)
    {
        this.directionalLightID = _directionalLightID;
    }
}
